Sentiment Analysis of Kanye’s Lyricism

Return to Site

Plotting the Music

First, let’s take a look at valence, which by Spotify’s definition is an attribute “that describes the musical positiveness conveyed by a track. Tracks with high valence sound more positive (happy, cheerful, euphoric), while tracks with low valence sound more negative (sad, depressed, angry).”

This ridgeline plot of valence by album shows a clear trend in Kanye’s music, progressing towards the lower end of the valence scale:

Organizing each album by mean valence pretty clearly shows this trend as well, you practically end up with the order of Kanye’s discography, with just Graduation and Late Registration being switched, and even then just barely.

Before beginning the sentiment analysis it seems useful to look at what the songs mean using Spotify’s metrics to evaluate the emotions of a song, the following plots investigate how valence (x-axis) interacts with energy (y-axis), essentially producing a 4 quadrant graph where from quadrant 1-4 we have Anger, Happiness, Sadness, and Calmness. The colors on the labels in these graphs match the colors of the album covers just for fun, they don’t actually mean anything. For College Dropout it seems to be a very happy album, the energy in tracks like “Jesus Walks”,“New Workout Plan”, and “Last Call” is evident placing them high in the upper right quadrant. Meanwhile some tracks appear in the “calm” yet still happy lower right quadrant, these are mostly the skits which include a lot of dialogue making how Spotify measures energy an imperative question. It seems to be successful regardless as these are definitely lower energy songs, in fact every categorization here seems remarkably accurate.

Late Registration appears to be very similar to College Dropout with a slight drop in valence indicates an “angrier” album, and the skits once again appear in the exact same place.

Graduation has tracks that range across the “energy-valencesphere”, but still remain tightly clumped towards the upper half, indicating a high variance in valence, but very low variance in energy. The only surprise here is “Everything I Am” which should definitely be rated in the lower left near “I Wonder”.

808s & Heartbreak is far from where we started with College Dropout, everything tends towards the lower left, but funnily enough the breakout from this album, “Heartless”, comes up in the Happy section with decent valence and energy scores.

My Beautiful Dark Twisted Fantasy once again entirely shifts the narrative this time largely appearing in the upper left as “angry”. The interlude for “All of the Lights” is of course an outlier since it is an instrumental, but Spotify’s metrics seems to get everything right here, this album is very high energy, and a lot of these songs do have an angry tone. The only alteration that could be made is tweaking “Runaway’s” energy score so it appears in sadness, but it’s results seem reasonable, the rising cacophony of distortion in the second half of the song certainly has significant energy.

Yeezus was a game-changer, but according to Spotify’s metrics not really, this one tightly clusters in the middle-left, not showing much significant other than that it was a slightly angry album.

If anything can be said about The Life Of Pablo, it can definitely be said that it is diverse in nearly every way. There are many different features, instruments, and styles on this album so the massive dispersion of valence and energy that are found are not surprising, starting with the gospel-like “Ultralight Beam”, and ending with the more traditional rap “Saint Pablo” it’s hard to imagine TLOP getting any other result.

Based on valence and energy, and actually listening to the album I think anyone would agree with these results, ye is an angry and sad album. In this time Kanye was confused, angry and lashing out, yet restrained by his family and pouring out his feelings into this album, resulting in a mixed bag of songs.

Let’s check out all the songs organized by valence, once again color coded by album. The Life of Pablo, College Dropout, and Graduation all feature highest here. The song’s that are actually showing up are interestingly mostly verbose, ironic songs which have dialogues to them most of the time.

Here is a plot of valence, danceability, and energy as functions of album year, which for Kanye is just his album discography. Danceability is defined by Spotify as “describing how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.” Energy is meanwhile described as “a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.” The metric of “sonic score” looks at each of these and simply takes their sum, in the future I will look into creating a sonic score also weighted by sentiment of the lyricism.

Looking at this as a table for each track we see similar results to what valence yields, which makes sense, energy, valence, and danceability are all highly correlated so when adding them together not much changes.

This table has the mean of all of Spotify’s metrics by track, which seems to show a fairly consistent pattern for Kanye’s discography.

Sentiment Analysis

After tokenizing the lyrics from scraping genius of each song listed on Spotify, then removing stop words with tidytext, this wordcloud of the top 200 words in Kanye’s music is produced:

This says a lot about what most people already know about Kanye, he is explicit and sings about what he feels, his most common word is “shit”, but his second most common is “love”, and third most is “feel”. He is frequently rapping emphatically about his feelings which then relate to his other primary interests of god, love, and his personal relationships.

Here is what this looks like ranked, in a less messy format:

How many tracks does the word “kanye” appear in, and how often? Obviously a lot in “I Love Kanye”, but surprisingly enough only once in “Wake Up Mr. West”, and not even that much overall, I would not be surprised if most artists had similar amounts of self-references throughout their discography. Since he often refers to himself as ye, yeezy, or yeezus, I also include those in the table count, but asides from “yeezy” neither of the other two even show up that much, yeezus only appearing once in “Highlights” and “I am a God” each. “Yeezy” shows up a bunch in The Life of Pablo songs which is interesting,

In this wordcloud for just the album ye, you can see why sentiment analysis would pick this up as deeply depressed/angry/sad, which is what is found no matter what algorithm you use. Once again it seems extremely meaningful to take tone into context, both of voice and of the music.

In this wordcloud for 808s & Heartbreak, the issue is clear once again, although this time it could literally just because Kanye says “Amazing” A LOT in the song amazing, in fact he says it 55 times, which is the third most frequent by song out of all of his discography. Coming just after “bam” which isn’t sang by him in Famous, and “ey” also in Famous, it can really be argued that it is the largest personal use in his discography.

Finally, in this wordcloud for My Beautiful Dark Twisted Fantasy, there is not much to interpret immediately as there is a lot going on, but if you’ve heard this album the results here make complete sense, and each song is easily identifiable.

Lexical diversity is a measurement of the ratio of unique words to total words, which I calculate below after separately grouping albums and tracks. Kanye’s lexical diversity is fairly consistently in the middle ranges, although there are some outliers in The Life of Pablo and The College Dropout that should be investigated. Additionally, I haven’t filtered out all his feature’s from the data here, so there could be a lot of obfuscation going on,

Here is the data in a table grouped by track and color coded by album then organized by least lexical diversity, keep in mind that lexical diversity is a ratio so the scale is 0 to 1. 808s & Heartbreak features prominently in the second page along with My Beautiful Dark Twisted Fantasy on the first and second. Skit #2 is number one mostly because it is so short, and mostly consists of Kanye saying “we broke”.

Now for the real fun, sentiment analysis using NRC, AFINN, and BING, which is surprisingly straightforward. The AFINN lexicon scores each word from -5 to 5, based on how positive or negative it is. Some words therefore have no score as they have a neutral effect, such as “the”. The following bar graph gives the sum of scores by each album, after weighting by differences in the total number of words per album.

These are the weighted scores with AFINN, it looks like its not a great tool in general given that it got the exact opposite of what it should have - that 808s was Kanye’s most depressed and lowest point, it would be useful in the future to try to weight instrumental components in this analysis, to try to give context to the data.

Now using the bing lexicon I take a look at The Life of Pablo, which has a very negative AFINN score. In this case, each numerical measure represents a word, the bing lexicon uses the two categories “positive” and “negative” instead of scoring; for example, the graph shows that “No More Parties in LA” has thirty positive words and twenty negative words.

Replicating this for 808s & Heartbreak we see some results that flip what AFINN says, most of the words are negative, in fact in “Welcome to Heartbreak” there is not a single positive word.

Finally, this radar chart looks at each of Spotify’s metrics in each album and tries to plot each of them using the nrc lexicon to show emotion in joy, anticipation, trust, surprise, sadness, anger, disgust and fear.

 

A work by Duncan Gates

gatesdu@oregonstate.edu